/*
 * XML Type:  SellMutualFund
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.SellMutualFund
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML SellMutualFund(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class SellMutualFundImpl extends net.ofx.types.x2003.x04.impl.AbstractInvestmentSellTransactionImpl implements net.ofx.types.x2003.x04.SellMutualFund
{
    
    public SellMutualFundImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SELLTYPE$0 = 
        new javax.xml.namespace.QName("", "SELLTYPE");
    private static final javax.xml.namespace.QName AVGCOSTBASIS$2 = 
        new javax.xml.namespace.QName("", "AVGCOSTBASIS");
    private static final javax.xml.namespace.QName RELFITID$4 = 
        new javax.xml.namespace.QName("", "RELFITID");
    
    
    /**
     * Gets the "SELLTYPE" element
     */
    public net.ofx.types.x2003.x04.SellTypeEnum.Enum getSELLTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SELLTYPE$0, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.SellTypeEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "SELLTYPE" element
     */
    public net.ofx.types.x2003.x04.SellTypeEnum xgetSELLTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SellTypeEnum target = null;
            target = (net.ofx.types.x2003.x04.SellTypeEnum)get_store().find_element_user(SELLTYPE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "SELLTYPE" element
     */
    public void setSELLTYPE(net.ofx.types.x2003.x04.SellTypeEnum.Enum selltype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SELLTYPE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SELLTYPE$0);
            }
            target.setEnumValue(selltype);
        }
    }
    
    /**
     * Sets (as xml) the "SELLTYPE" element
     */
    public void xsetSELLTYPE(net.ofx.types.x2003.x04.SellTypeEnum selltype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SellTypeEnum target = null;
            target = (net.ofx.types.x2003.x04.SellTypeEnum)get_store().find_element_user(SELLTYPE$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.SellTypeEnum)get_store().add_element_user(SELLTYPE$0);
            }
            target.set(selltype);
        }
    }
    
    /**
     * Gets the "AVGCOSTBASIS" element
     */
    public java.lang.String getAVGCOSTBASIS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AVGCOSTBASIS$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "AVGCOSTBASIS" element
     */
    public net.ofx.types.x2003.x04.AmountType xgetAVGCOSTBASIS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(AVGCOSTBASIS$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "AVGCOSTBASIS" element
     */
    public boolean isSetAVGCOSTBASIS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(AVGCOSTBASIS$2) != 0;
        }
    }
    
    /**
     * Sets the "AVGCOSTBASIS" element
     */
    public void setAVGCOSTBASIS(java.lang.String avgcostbasis)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(AVGCOSTBASIS$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(AVGCOSTBASIS$2);
            }
            target.setStringValue(avgcostbasis);
        }
    }
    
    /**
     * Sets (as xml) the "AVGCOSTBASIS" element
     */
    public void xsetAVGCOSTBASIS(net.ofx.types.x2003.x04.AmountType avgcostbasis)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(AVGCOSTBASIS$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AmountType)get_store().add_element_user(AVGCOSTBASIS$2);
            }
            target.set(avgcostbasis);
        }
    }
    
    /**
     * Unsets the "AVGCOSTBASIS" element
     */
    public void unsetAVGCOSTBASIS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(AVGCOSTBASIS$2, 0);
        }
    }
    
    /**
     * Gets the "RELFITID" element
     */
    public java.lang.String getRELFITID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RELFITID$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "RELFITID" element
     */
    public net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType xgetRELFITID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType target = null;
            target = (net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType)get_store().find_element_user(RELFITID$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "RELFITID" element
     */
    public boolean isSetRELFITID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(RELFITID$4) != 0;
        }
    }
    
    /**
     * Sets the "RELFITID" element
     */
    public void setRELFITID(java.lang.String relfitid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RELFITID$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(RELFITID$4);
            }
            target.setStringValue(relfitid);
        }
    }
    
    /**
     * Sets (as xml) the "RELFITID" element
     */
    public void xsetRELFITID(net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType relfitid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType target = null;
            target = (net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType)get_store().find_element_user(RELFITID$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.FinancialInstitutionTransactionIdType)get_store().add_element_user(RELFITID$4);
            }
            target.set(relfitid);
        }
    }
    
    /**
     * Unsets the "RELFITID" element
     */
    public void unsetRELFITID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(RELFITID$4, 0);
        }
    }
}
